<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>vue[focus实例]</title>
		<script src="vue.js"></script>
	</head>

	<body>
		<div id="app">
			<input type="text" v-focus="true" />
		</div>

		<script>
			//注册根目录下的文本框进行鼠标定位
			Vue.directive('focus')
			var vm = new Vue({
				el: "#app",
				data: {
					str: "我是根元素当中的属性",
					obj: {}
				}
			})
			Vue.set(vm.obj, 'temp', '我是vue.set注入的属性')
		</script>
	</body>

</html>